Video systems are known to include a plurality of communication devices and communication channels, which provide the communication medium for the communication devices. For example, the communication channel may be wireline connections or RF frequency carriers. To increase the efficiency of the video system, video that needs to be communicated over the communication medium is digitally compressed. The digital compression reduces the number of bits needed to represent the video while maintaining perceptual quality of the video. The reduction in bits allows more efficient use of channel bandwidth and reduces storage requirements. To achieve digital video compression, each communication device may include an encoder and a decoder. The encoder allows a communication device to compress video before transmission over a communication channel. The decoder enables the communication device to receive compressed video from a communication channel and render it visible. Communication devices that may use digital video compression include high definition television transmitters and receivers, cable television transmitters and receivers, video telephones, computers and portable radios.
Several standards for digital video compression have emerged, including International Telecommunications Union, ITU, -T Recommendation H.261, the International Standards Organization/International Electrotechnical Committee, ISO/IEC, 11172-2 International Standard, MPEG-1, and the forthcoming ISO/IEC 13818-2 standard, MPEG-2. These standards designate the requirements for a decoder by specifying the syntax of a bit stream that the decoder must decode. This allows some flexibility in the creation of the encoder, but the encoder must be capable of generating a bit stream that meets the specified syntax and decoder model.
To maximize usage of the available channel bandwidth and the quality of the video, the encoder seeks to match the number of bits it generates to the available channel bandwidth. This is often accomplished by selecting a target number of bits to be used for the representation of a video frame or picture. The target number of bits is referred to as the bit allocation. A further consideration for the encoder in generating bits is the capacity of any buffers in the system. Generally, since the bit rates of the encoder, decoder, and the channel are not constant, there are buffers placed at both ends of the channel, one following the encoder prior to the channel and one at the end of the channel preceding the decoder. The buffers absorb the fluctuation in bit rates. The encoder often must insure that the buffers at the encoder and decoder will not overflow or underflow as a result of the bit stream generated.
Generally, and in particular in the case of emerging video compression standards, more than one picture type is used for encoding the pictures. For example, MPEG uses intracoded pictures, predicted pictures, and bidirectionally predicted pictures. Intracoded pictures use only the information contained within the current picture itself for encoding. Predicted pictures use the current picture and the previously encoded frame as a reference to encode the current picture. By using a previously encoded picture as a reference, fewer bits are generally generated since only differences between the current picture and the previously encoded picture need to be encoded. Similarly bidirectionally encoded pictures may use a past and/or previously encoded picture as a reference in addition to the current picture to encode the current picture. The different picture types inherently generate a varying number of bits. Since intracoded pictures do not use a reference picture for creating the current picture, they inherently use more bits than a bidirectionally encoded picture, and predicted pictures generally generate more bits than bidirectionally encoded pictures but less bits than intracoded pictures. The different picture types add a level of complexity to the problem of matching the encoder rate to the channel rate since different pictures inherently need to use more or less bits. If the encoder used only one picture type, then the encoder could force the bit allocation for each picture to an average which matches the channel rate. Where there are varying picture types with inherently different bit rates, forcing each picture to conform to one average would destroy quality by forcing the intracoded pictures to have a lower bit allocation and forcing the bidirectionally encoded pictures to have a higher bit allocation.
Therefore, a need exists for a method and device for determining bit allocation for multiple picture type encoding such that the average bit rate of the encoder is compatible with the channel bit rate and such that good visual quality is achieved and maintained.